/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/page`, params)
// 查询详情
export const getDetail = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/selectOne`, {params})
//保存
export const updatePlateApply = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/saveOne`, params)
// 车辆信息查询
export const getcarall = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/page/all`, params)
//导出
export const exportList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/excel`, params,{responseType:'blob'})
  //提交
export const doneCommit = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/done`, params)

//刪除
export const deleteRow = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/delete`, {params})

// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
// 资金类型接口
// export const gettmFiAccountType = (params) => axios.post(`${SERVER.WHOLESALES}/ttFiAccount/list`, params)//2021 11 19 mod
export const gettmFiAccountType = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/returnAccounts`, {params})
// 审核
export const checkStatus = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/checkStatus`, params)
// 操作记录
export const getLogList = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/selectLog`, {params})

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
//批量同意

export const agreeByIds = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsPurchaseReturn/moreCheckStatus`, params)
